Field of the Invention
The present invention relates to a communication apparatus, a method of controlling the same, and a storage medium.
Description of the Related Art
Equipping a multi-function peripheral (MFP) or the like with NFC (Near Field Communication) is becoming universalized. In an NFC tag, information specifying an apparatus in which the NFC tag is equipped, such as connection information (an IP address or a MAC address) of the apparatus is recorded.
Meanwhile, in a mobile terminal that can read content of an NFC tag by touching the NFC tag, an application that prints an image, a document or the like may be implemented. A handover that uses NFC information in which, with such a mobile terminal, in a state in which the application is activated and an image is displayed on a display unit of the mobile terminal, for example by touching an NFC tag equipped in an MFP, the image data of the image is read by the MFP is known. It is possible for the mobile terminal to connect to the MFP via the wireless LAN in accordance with the NFC information, designate the MFP of the handover destination to be a print destination, and then the MFP to print.
For example Japanese Patent Laid-Open No. 2014-197262 discloses a technique in which, when switching to wireless communication via an access point, to decide which access point to connect to, a history of access points previously connected to is referred to, and access points are connected to in an order of the history.
As in the above described prior art, when connecting to access points in sequence in accordance with a history of previously connected access points history, there is a problem in that a long time is required for the connection because the history includes an access point which cannot connect to the MFP to which connection is desired.